import { useUserStore } from "@/stores"

export const checkPermissions = (requiredPermission) => {
  const userStore = useUserStore();
  const permissionList = userStore.getPermissions();
  for (const permission of permissionList) {
    if (requiredPermission === permission) {
      return true;
    }
  }
  return false;
}